package com.zsc.shixun.model.article;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * <p>
 * markdown编辑器修改VO
 * </p>
 *
 * @author ZWYZY
 * @since 2020/6/17
 */
@Data
public class ArticleUpdateVO {
    @ApiModelProperty(value = "编号")
    @TableId(value = "id", type = IdType.AUTO)
    @NotNull(message = "必须填id")
//    @NotBlank(message = "id不能为空")
    private Long id;

    @ApiModelProperty(value = "文章标题")
    @NotNull(message = "必须填文章标题")
    @NotBlank(message = "文章标题不能为空")
    private String title;

    @ApiModelProperty(value = "文件类型")
    private String contentMd;

    @ApiModelProperty(value = "文章具体内容")
    @NotNull(message = "必须填文章内容")
    @NotBlank(message = "文章内容不能为空")
    private String content;

    @ApiModelProperty(value = "文章分类（类型）")
    @NotNull(message = "必须填文章分类")
    @NotBlank(message = "文章分类不能为空")
    private String categories;

    @ApiModelProperty(value = "文章标签")
    @NotNull(message = "必须填文章标签")
    @NotBlank(message = "文章标签不能为空")
    private String tags;

    @ApiModelProperty(value = "是否评论")
    @NotNull(message = "必须填评论")
//    @NotBlank(message = "评论不能为空")
    private Boolean isComment;

    @ApiModelProperty(value = "用户id,关联b_user.id")
    private Long userId;

    @ApiModelProperty(value = "是否发布(0为草稿，1为发布)")
    @NotNull(message = "必须填发布")
//    @NotBlank(message = "发布不能为空")
    private Boolean isRelease;

    @ApiModelProperty(value = "发布时间")
    private Date releaseTime;

}
